import request from '@/utils/request.js'

// 获取学科列表
export const subjectList = (params) => {
  return request({
    url: '/subject/list',
    method: 'get',
    params
  })
}

// 添加学科
export const subjectAdd = (data) => {
  return request({
    url: '/subject/add',
    method: 'post',
    data
  })
}

// 修改学科
export const subjectEdit = (data) => {
  return request({
    url: '/subject/edit',
    method: 'post',
    data
  })
}

// 删除学科
export const subjectRemove = (data) => {
  return request({
    url: '/subject/remove/' + data.id,
    method: 'post',
    data
  })
}

// 状态
export const subjectStatus = (data) => {
  return request({
    url: '/subject/status/' + data.id,
    method: 'post',
    data
  })
}
